// ApplicationDlg.h : header file
//

#if !defined(AFX_APPLICATIONDLG_H__D3E3BA87_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_)
#define AFX_APPLICATIONDLG_H__D3E3BA87_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DialogResize.h"
#include "InfobarCtrl.h"
#include "KUserList.h"
//#include "KTokenInit.h"
#include "KUnLockPin.h"
#include "KAuThenTicationTest.h"
#include "KTokenSyc.h"
#include "KTokenInfo.h"
#include "KChangePwd.h"
#include "KNoRights.h"
#include "KLicence.h"
#include "KSysLog.h"
#include "KRadiusList.h"
#include "KRadiusPort.h"
#include "KPINPolicyDlg.h"

class CApplicationDlg : public CDialogResize
{
// Construction
public:
	void OnLicence();
	void OnLog();
	void test();
	CApplicationDlg(CWnd* pParent = NULL);	// standard constructor
	virtual ~CApplicationDlg();	

	KUserList m_KUser;
	KTokenInfo m_KTokenInfo;
	KUnLockPin m_KUnLock;
	KAuThenTicationTest m_KAuthTest;
	KTokenSyc  m_KTokenSyc;
	KNoRights  m_KNoRights;

// Dialog Data
	//{{AFX_DATA(CApplicationDlg)
	enum { IDD = IDD_APPLICATION };
	CInfobarCtrl m_InfobarCtrl;
	CListCtrl	m_OutlookBar;
	//}}AFX_DATA

	CString m_Rights;
	CString m_curUser,m_curPwd;
	int  m_licenses;
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CApplicationDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	char* FormatSize(DWORD dwSizeLow, DWORD dwSizeHigh);

	void SetOnlineLed(BOOL bOnline);
	void SetOfflineLed(BOOL bOffline);
	BOOL m_bInitialized;
	HICON m_hIcon;

	void SetupOutlookBar();
	CImageList m_ImageList;

	CToolTipCtrl m_ToolTipCtrl;

	void MoveChilds();
	void ActivatePage(int nIndex);

	BOOL CreateStatusbar();
	CStatusBar m_wndStatusBar;
    CToolBar m_wndToolBar;

	// Generated message map functions
	//{{AFX_MSG(CApplicationDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnDestroy();
	afx_msg void OnUpdateViewSyc(CCmdUI* pCmdUI);
	afx_msg void OnClickOutlookBar(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKeydownOutlookBar(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnServerExit();
	afx_msg void OnClose();
	afx_msg void OnTokenUser();
	afx_msg void OnTokenInit();
	afx_msg void OnTokenUnLock();
	afx_msg void OnTokenInfo();
	afx_msg void OnTokenTest();
	afx_msg void OnTokenSyc();
	afx_msg void OnChangePwd();
	afx_msg void OnHelpIndex();
	afx_msg void OnRadius();
	afx_msg void OnRadiusPort();
	afx_msg void OnUpdateViewInfo(CCmdUI* pCmdUI);
	afx_msg void OnUpdateViewUnLock(CCmdUI* pCmdUI);
	afx_msg void OnHelpAbout();
	afx_msg void OnUpdateViewUser(CCmdUI* pCmdUI);
	afx_msg void OnUpdateViewTest(CCmdUI* pCmdUI);
	afx_msg void OnPINPolicy();
	afx_msg void OnSetExAuthOpt();
	//}}AFX_MSG
	LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam);
	LRESULT OnFtpStatistic(WPARAM wParam, LPARAM lParam);
    BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult);

	DECLARE_MESSAGE_MAP()

	DECLARE_DLGRESIZE_MAP;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_APPLICATIONDLG_H__D3E3BA87_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_)
